FROM openshift/golang-builder@sha256:4820580c3368f320581eb9e32cf97aeec179a86c5749753a14ed76410a293d83 AS builder
ENV __doozer=update BUILD_RELEASE=202202160023.p0.g913f3f3.assembly.stream BUILD_VERSION=v4.10.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=10 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.10.0-202202160023.p0.g913f3f3.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=913f3f3 OS_GIT_VERSION=4.10.0-202202160023.p0.g913f3f3.assembly.stream-913f3f3 SOURCE_DATE_EPOCH=1644964718 SOURCE_GIT_COMMIT=913f3f36494108ebec9f854fef6f3528ed0fcd1a SOURCE_GIT_TAG=v4.0.0-alpha.0-1603-g913f3f364 SOURCE_GIT_URL=https://github.com/openshift/cluster-kube-apiserver-operator 
WORKDIR /go/src/github.com/openshift/cluster-kube-apiserver-operator
COPY . .
ENV GO_PACKAGE github.com/openshift/cluster-kube-apiserver-operator
RUN make build --warn-undefined-variables

FROM openshift/ose-base:v4.10.0.20220216.010142
ENV __doozer=update BUILD_RELEASE=202202160023.p0.g913f3f3.assembly.stream BUILD_VERSION=v4.10.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=10 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.10.0-202202160023.p0.g913f3f3.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=913f3f3 OS_GIT_VERSION=4.10.0-202202160023.p0.g913f3f3.assembly.stream-913f3f3 SOURCE_DATE_EPOCH=1644964718 SOURCE_GIT_COMMIT=913f3f36494108ebec9f854fef6f3528ed0fcd1a SOURCE_GIT_TAG=v4.0.0-alpha.0-1603-g913f3f364 SOURCE_GIT_URL=https://github.com/openshift/cluster-kube-apiserver-operator 
COPY --from=builder /go/src/github.com/openshift/cluster-kube-apiserver-operator/bindata/bootkube/bootstrap-manifests /usr/share/bootkube/manifests/bootstrap-manifests/
COPY --from=builder /go/src/github.com/openshift/cluster-kube-apiserver-operator/bindata/bootkube/config /usr/share/bootkube/manifests/config/
COPY --from=builder /go/src/github.com/openshift/cluster-kube-apiserver-operator/bindata/bootkube/manifests /usr/share/bootkube/manifests/manifests/
COPY --from=builder /go/src/github.com/openshift/cluster-kube-apiserver-operator/bindata/bootkube/scc-manifests /usr/share/bootkube/manifests/manifests/
COPY --from=builder /go/src/github.com/openshift/cluster-kube-apiserver-operator/cluster-kube-apiserver-operator /usr/bin/
COPY manifests /manifests
COPY bindata/bootkube/scc-manifests /manifests
COPY vendor/github.com/openshift/api/operator/v1/0000_20_kube-apiserver-operator_01_config.crd.yaml /manifests
# FIXME: entrypoint shouldn't be bash but the binary (needs fixing the chain)
# ENTRYPOINT ["/usr/bin/cluster-kube-apiserver-operator"]

LABEL \
        io.openshift.release.operator="true" \
        name="openshift/ose-cluster-kube-apiserver-operator" \
        com.redhat.component="ose-cluster-kube-apiserver-operator-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="kube-apiserver" \
        release="202202160023.p0.g913f3f3.assembly.stream" \
        io.openshift.build.commit.id="913f3f36494108ebec9f854fef6f3528ed0fcd1a" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-kube-apiserver-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-kube-apiserver-operator/commit/913f3f36494108ebec9f854fef6f3528ed0fcd1a" \
        version="v4.10.0"

